//
//  FeedbackRequest.m
//  SleepingElf
//
//  Created by karong on 2023/10/26.
//

#import "FeedbackRequest.h"

@implementation FeedbackRequest
+ (void)submitFeedbackWithContent:(NSString *)content contact:(NSString *)contact success:(EmptyBlock)success failed:(Failure)failed {
    NSString * url = API_FEEDBACK_SUBMIT;
    NSMutableDictionary * parameters = [NSMutableDictionary new];
    parameters[@"content"] = SEEmptyStr(content);
    SEIsNullOrEmpty(contact)?nil:(parameters[@"contact"] = SEEmptyStr(contact));
    
    [self postWithURLString:url parameters:parameters success:^(NSDictionary * _Nonnull responseDict) {
        success();
    } failure:failed];
}
@end
